﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Vehicle
{
    public class Vehicle
    {
        protected int numberoftire;
        protected String color;
        protected double weight;
        protected double speed;
        public Vehicle()
        {
            this.numberoftire = 4;
            this.speed = 0;
        }
        public void accelarate(double value)
        {
            Console.WriteLine("汽车加速");
            this.speed += value;
        }
        public void deaccelarate(double value)
        {
            Console.WriteLine("汽车减速");
            this.speed -= value;
        }
        public void stop()
        {
            Console.WriteLine("汽车停止");
            this.speed = 0;
        }
        public double getSpeed()
        {
            return this.speed;
        }
    }
}
